<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/regist.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script src="/js/plugins/js-cookie/js.cookie.min.js"></script>
    <script type="text/javascript" src="/js/vue/common.js"></script>
    <script type="text/javascript" src="/js/system/regist.js"></script>
   <!-- &lt;!&ndash; jquery-validation验证 &ndash;&gt;
    <script src="js/plugins/jquery-validator/jquery.js"></script>
    <script src="js/plugins/jquery-validator/jquery.validate.min.js"></script>
    <script src="js/plugins/jquery-validator/messages_zh.js"></script>

    <style>
        .error {
            color: red;
        }
    </style>
    <script>
        $.validator.setDefaults({
            submitHandler: function () {
                debugger;
                $.ajax({
                    url: domainUrl + "/userRegist",
                    type: "POST",
                    data: {
                        phone: $("#phone").val(),
                        nickname: $("#nickname").val(),
                        password: $("#password").val(),
                        rpassword: $("#rpassword").val(),
                        verifyCode: $("#verifyCode".val())
                    },
                    success: function (data) {
                        debugger;
                        if (data.code == 200) {
                            location.href = "/login.html";
                        } else {
                            popup(data.msg);
                        }
                    }
                });
            }
        });

        $(document).ready(function () {
            // 在键盘按下并释放及提交后验证提交表单
            $("#editForm").validate({
                rules: {
                    /*  nickname: {
                          required: "required",
                          remote: { //远程验证
                              url: "#",     //后台处理程序
                              type: "post",               //数据发送方式
                              dataType: "json",           //接受数据格式
                              data: {                     //要传递的数据
                                  username: function() {
                                      return $("#username").val();
                                  }
                              }
                          }
                      },*/
                    nickname: "required",
                    password: {
                        required: true,
                        minlength: 5
                    },
                    rpassword: {
                        required: true,
                        minlength: 5,
                        equalTo: "#password"
                    },
                    verifyCode: "required",
                },
                messages: {
                    nickname: "请输入您的昵称",
                    password: {
                        required: "请输入密码",
                        minlength: "密码长度不能小于 5 个字母"
                    },
                    password: {
                        required: "请输入密码",
                        minlength: "密码长度不能小于 5 个字母",
                        equalTo: "两次密码输入不一致"
                    },
                    verifyCode: "请输入验证码",
                }
            });
        });

    </script>
-->
</head>
<body>
<div class="wrapper">
    <div class="container container-login">
        <a href="javascript:;" title="返回首页" class="logo">骡窝窝</a>
        <div class="signup-forms flip">
            <div class="login-box" id="_j_login_box">
                <div class="inner inner_v2 clearfix">
                    <div class="inner_v2_left">
                        <form id="_j_login_form" action="javascript:;">
                            <div class="form-field">
                                <input id="inputPassword" type="text" placeholder="您的手机号" autocomplete="off" value="">
                                <div class="err-tip"></div>
                            </div>
                            <div class="submit-btn">
                                <button id="_js_loginBtn">立即注册</button>
                            </div>
                        </form>
                        <div class="agreement">
                            注册视为同意<a target="_blank" href="javascript:;">《骡窝窝用户使用协议》</a>
                        </div>
                        <div class="connect">
                            <p class="hd">用合作网站账户直接登录</p>
                            <div class="bd">
                                <a href="javascript:;" class="weibo"><i></i>新浪微博</a>
                                <a href="javascript:;" class="qq"><i></i>QQ</a>
                                <a href="javascript:;" class="weixin"><i></i>微信</a>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                    <div class="inner_v2_right">
                        <img src="/images/qrcode.jpg">
                        <p>扫一扫<br>下载骡窝窝APP</p>
                    </div>
                </div>
            </div>
            <div class="signup-box" style="display: none;">
                <div class="add-info">
                    <div class="hd">账号注册</div>
                    <form method="post" id="editForm">
                        <input type="hidden" name="phone" value="" id="phone">
                        <div class="form-field m-t-10">
                            <input id="nickname" name="nickname" type="text" placeholder="您的昵称">
                            <div class="err-tip"></div>
                        </div>
                        <div class="form-field">
                            <input id="password" name="password" type="password" placeholder="您的密码">
                            <div class="err-tip"></div>
                        </div>
                        <div class="form-field">
                            <input id="rpassword" name="rpassword" type="password" placeholder="确认密码">
                            <div class="err-tip"></div>
                        </div>

                        <div class="form-field">
                            <div class="clearfix">
                                <a href="#" class="vcode-send sms-code-send">获取验证码</a>
                                <input id="verifyCode" name="verifyCode" type="text" placeholder="短信验证码"
                                       autocomplete="off" class="vcode-input">
                            </div>
                            <div class="err-tip clearfix"></div>
                        </div>
                        <div class="submit-btn">
                            <button class="submit" type="submit">完成注册</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="fullscreen-bg"
     style="background-image: url('images/27.jpg');">
    <img src="images/27.jpg" style="width: auto; height: 657px; margin-top: -213px;">
</div>
</body>
</html>